import net from 'net'

const client = net.createConnection({
   port: 3000,
   host: '127.0.0.1'
})

client.on('data', (data) => {
  console.log('Received data:', data.toString());
})

client.write('client 发送的');